package com.yu;


import com.yu.annotation.RpcReference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class HelloController {

    @RpcReference(version = "version1", group = "test1")
    private HelloService helloService;

    public void test() throws InterruptedException {
        String hello = helloService.hello(new Hello("中国", "中国地处东亚"));
        //如需使用 assert 断言，需要在 VM options 添加参数：-ea
        assert "Hello description is 中国地处中亚".equals(hello);
        log.info("返回结果为：[{}]",hello);
        Thread.sleep(12000);
    }
}
